package base

//go:generate msgp

//msgp:tuple ObjectBaseExt
type ObjectBaseExt struct {
	Height    float32 `json:"height" msg:"height"`
	Scale     float32 `json:"scale" msg:"scale"`
	Collider  float32 `json:"collider" msg:"collider"`
	Radius    float32 `json:"radius" msg:"radius"`
	SizeX     float32 `json:"sizeX" msg:"sizeX"`
	SizeY     float32 `json:"sizeY" msg:"sizeY"`
	SizeZ     float32 `json:"sizeZ" msg:"sizeZ"`
	CenterX   float32 `json:"centerX" msg:"centerX"`
	CenterY   float32 `json:"centerY" msg:"centerY"`
	CenterZ   float32 `json:"centerZ" msg:"centerZ"`
	Rigidbody bool    `json:"rigidbody" msg:"rigidbody"`
	Trigger   bool    `json:"trigger" msg:"trigger"`
	Gravity   bool    `json:"gravity" msg:"gravity"`
	Kinematic bool    `json:"kinematic" msg:"kinematic"`
	Speed     float32 `json:"speed" msg:"speed"`
	Rotate    float32 `json:"rotate" msg:"rotate"`
}

func NewObjectBase(base *SettingBase) *ObjectBaseExt {
	ext := &ObjectBaseExt{
		Height:    base.Height,
		Scale:     base.Scale,
		Collider:  base.Collider,
		Radius:    base.Radius,
		SizeX:     base.SizeX,
		SizeY:     base.SizeY,
		SizeZ:     base.SizeZ,
		CenterX:   base.CenterX,
		CenterY:   base.CenterY,
		CenterZ:   base.CenterZ,
		Rigidbody: base.Rigidbody,
		Trigger:   base.Trigger,
		Gravity:   base.Gravity,
		Kinematic: base.Kinematic,
		Speed:     base.Speed,
		Rotate:    base.Rotate,
	}
	return ext
}
